import { CheckEntry } from "./CheckEntry";

export async function processAfterCheck(checkEntry: CheckEntry) {
    let fileReports = [];
    if (checkEntry.projectConfig.fix === 'true') {
        // 代码修复
        fileReports = checkEntry.codeFix();
    } else {
        // 无修复，按规则和文件两个维度归类issue
        fileReports = checkEntry.sortIssues();
    }
    // 发送消息
    await checkEntry.message?.sendResult(fileReports, checkEntry.projectConfig.reportDir);
}